import { downLoad, request } from '../request';

/**
 * Login
 *
 * @param userName User name
 * @param password Password
 */
export function post(url: string, data: any) {
  return request({
    url,
    method: 'post',
    data
  });
}
export function postFormData(url: string, data: any) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    url,
    method: 'post',
    data
  });
}
export function put(url: string, data: any) {
  return request({
    url,
    method: 'put',
    data
  });
}

export function get(url: string, params: any) {
  return request({
    url,
    method: 'get',
    params
  });
}

export function downLoadExcel(url: string, params: any, fileName: string) {
  return downLoad({
    url,
    params,
    method: 'GET',
    fileName
  });
}
